<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div id="filmListingContainer" class="listingContainer">

	<table id="filmListingTable" class="listingTable">

		<tr id="filmTitleRow" class="listingRow">
			<td id="filmTitle" colspan="5" class="listingCell"><h3>${film.title}</h3></td>
		</tr>

		<tr id="filmQuickDetailsRow" class="listingRow">
			<td id="filmReleaseYear" class="listingCell"><i><c:out
						value="${film.releaseYear}" /></i></td>
			<td id="filmLength" class="listingCell"><i><c:out
						value="${film.length}" /> min</i></td>
			<td id="filmRating" class="listingCell"><i><c:out
						value="${film.rating}" /></i></td>
			<td id="filmRentalRate" class="listingCell"><i>$ <c:out
						value="${film.rentalRate}" /></i></td>
			<td id="filmLanguage" class="listingCell"><i><c:out
						value="${film.languageByLanguageId.name}" /></i></td>
		</tr>

		<tr id="filmLongDetailsRow" class="listingRow">
			<td id="filmDescription" colspan="2" class="listingCell"><i>Description:</i>
				<c:out value="${film.description}" /></td>
			<td id="filmSpecialFeatures" class="listingCell"><i>Special
					Features:</i> <c:out value="${film.specialFeatures}" /></td>
			<td id="filmoriginalLanguage" colspan="2" class="listingCell"><i>Original
					Language:</i> <c:choose>
					<c:when test="${film.languageByOriginalLanguageId.name == null}">
						<c:out value="${film.languageByLanguageId.name}" />
					</c:when>
					<c:otherwise>
						<c:out value="${film.languageByOriginalLanguageId.name}" />
					</c:otherwise>
				</c:choose></td>

		</tr>

		<tr id="filmCategoriesAndActorsRow" class="listingRow">
			<td id="filmCategories" colspan="2" class="listingCell">
				<table id="categoriesTable" class="innerListingTable">
					<tr id="categoriesHeaderRow" class="listingRow">
						<td id="categoriesHeader" class="listingCell"><h4>Categories
								this Film Belongs to</h4></td>
					</tr>
					<c:forEach items="${categoryList}" var="category">

						<tr class="ListingRow">
							<td class="listingCell"><c:out value="${category.name}" /></td>
						</tr>
					</c:forEach>
				</table>
			</td>

			<td id="filmCategoriesAndActorsSpacer" class="listingCell"></td>

			<td id="filmActors" colspan="2" class="listingCell">
				<table id="actorsTable" class="innerListingTable">
					<tr id="actorsHeaderRow" class="listingRow">
						<td id="actorsHeader" class="listingCell"><h4>Actors in
								this Film</h4></td>
					</tr>
					<c:forEach items="${actorList}" var="actor">

						<tr class="listingRow">
							<td class="listingCell"><c:out value="${actor.firstName}" />
								<c:out value="${actor.lastName}" /></td>
						</tr>
					</c:forEach>
				</table>
			</td>
		</tr>

	</table>

</div>